Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PMON] [Mellanox] fix syseepromd issue on simx #8131

Merged
merged 3 commits into from
Jul 20, 2021

Conversation

tomer-israel
Copy link
Contributor

@tomer-israel tomer-israel commented Jul 8, 2021

Avoid initializing sfp/thermal/components/fan/psu/leds on simx and create vpd_info file on hw_management when we use mellanox simulator platform

Why I did it

this is a fix for issue in mellanox simulator platforms. the syseepromd failed on the pmon docker. also "decode-syseeprom" failed also

How I did it

  • before initializing thermal/components/fan/psu/leds --> check if we are running on simx
  • creating the vpd_info on the hw_management folder.

How to verify it

  • check if syseepromd process was loaded properly on the pmon docker.
  • decode-syseeprom is working well without errors/warnings

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

fix issues on syseeprom on mellanox simulator platforms. problem was discovered on 202012 release.

@tomer-israel tomer-israel requested a review from lguohan as a code owner July 8, 2021 19:16
@tomer-israel
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@liat-grozovik liat-grozovik requested a review from nazariig July 13, 2021 09:00
@liat-grozovik
Copy link
Collaborator

@nazariig could you please help to review?

if not os.path.exists(os.path.dirname(EEPROM_SYMLINK)):
os.makedirs(os.path.dirname(EEPROM_SYMLINK))
if not os.path.exists(EEPROM_SYMLINK):
subprocess.check_call(['/usr/bin/xxd', '-r', '-p', 'syseeprom.hex', EEPROM_SYMLINK], cwd=platform_path)
Copy link
Collaborator

@nazariig nazariig Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tomer-israel why do we need to always check both?

Example:

if not os.path.exists(EEPROM_SYMLINK):
    if not os.path.exists(os.path.dirname(EEPROM_SYMLINK)):
        os.makedirs(os.path.dirname(EEPROM_SYMLINK))

    subprocess.check_call(['/usr/bin/xxd', '-r', '-p', 'syseeprom.hex', EEPROM_SYMLINK], cwd=platform_path)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed it as you suggested

@liat-grozovik liat-grozovik merged commit 950c24c into sonic-net:master Jul 20, 2021
@qiluo-msft
Copy link
Collaborator

This PR could not be cleanly cherry-pick to 202012. Please submit another PR.

judyjoseph pushed a commit that referenced this pull request Aug 4, 2021
Avoid initializing sfp/thermal/components/fan/psu/leds on simx and create vpd_info file on hw_management when we use mellanox simulator platform

- Why I did it
this is a fix for issue in mellanox simulator platforms. the syseepromd failed on the pmon docker. also "decode-syseeprom" failed also

- How I did it
before initializing thermal/components/fan/psu/leds --> check if we are running on simx
creating the vpd_info on the hw_management folder.

- How to verify it
check if syseepromd process was loaded properly on the pmon docker.
decode-syseeprom is working well without errors/warnings
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
Avoid initializing sfp/thermal/components/fan/psu/leds on simx and create vpd_info file on hw_management when we use mellanox simulator platform

- Why I did it
this is a fix for issue in mellanox simulator platforms. the syseepromd failed on the pmon docker. also "decode-syseeprom" failed also

- How I did it
before initializing thermal/components/fan/psu/leds --> check if we are running on simx
creating the vpd_info on the hw_management folder.

- How to verify it
check if syseepromd process was loaded properly on the pmon docker.
decode-syseeprom is working well without errors/warnings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants